use tracing::info;

use super::app::DB_POOL_MAP;

pub(crate) async fn redis() -> bool {
    true
}

pub(crate) async fn db() -> bool {
    let db_pool_hash = DB_POOL_MAP.clone();
    info!("start destory db.");
    for (name, pool) in db_pool_hash.iter() {
        let r = pool.clone().close().await;
        info!("Close db:{} pool:{:?}.", name, r);
    }
    info!("complete destory db.");
    true
}
